{{template "layout/layout_admin.html" .}}

{{define "style"}}

{{end}}

{{define "content"}}
<div class="layui-fluid main" style="margin:15px;">

    <fieldset class="layui-elem-field layui-field-title" style="margin-top:20px;">
        <legend>添加目标机器</legend>
    </fieldset>


<form class="layui-form" method="post" action="{{urlfor "MachineController.AddMcDo"}}">
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block" style="width:280px;">
            <input type="text" name="username" lay-verify="required" autocomplete="off" placeholder="填写机器名称" class="layui-input" value="">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">机器IP</label>
        <div class="layui-input-block" style="width:280px;">
            <input type="text" name="ip" lay-verify="required" autocomplete="off" placeholder="填写机器IP" class="layui-input" value="">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block"  style="width:280px;">
        <textarea name="remark" class="layui-textarea" ></textarea>
        </div>
    </div>

    <div class="layui-form-item" style="margin-top:50px;">
    <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="formSubmit">立即提交</button>
        <button type="reset" class="layui-btn layui-btn-primary" onclick="javascript:history.back();">返回</button>
    </div>
</div>
</form>

</div>
{{end}}
{{define "script"}}
<script>
layui.use(['form', 'laydate','upload','element','table'], function() {
    {{template "layout/baseJs.html" .}}
    var form = layui.form
    ,layer = layui.layer
    ,laydate = layui.laydate
    ,element = layui.element
    ,$ = layui.jquery
    ,table = layui.table;

    form.on('submit(formSubmit)', function(data){
        var url = $(data.form).attr('action');
        var params = $(data.form).serialize();
        QI.ajaxForm(url, params);
        return false;
    });



});
</script>
{{end}}
